home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / cbibcode.arc / TEXTMODE.C < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-05  |  884 b   |  40 lines

  1. /* p897.c --- bible */
  2. #include <conio.h>
  3. main()
  4. {
  5.     int oldmode;
  6.     struct text_info t_info;
  7.     gettextinfo(&t_info);
  8.     oldmode = t_info.currmode;
  9.     if(oldmode == MONO)
  10.     {
  11.         cputs("Monochrome mode: Cannot switch to any other mode.");
  12.     }
  13.     if(oldmode == C40 || oldmode == C80)
  14.     {
  15.         cputs("Color mode \n\r");
  16.         cputs("Press a key to switch mode \n\r");
  17.         getch();
  18.         if(oldmode == C40)
  19.             textmode(C80);
  20.         if(oldmode == C80)
  21.             textmode(C40);
  22.         cputs("Press any key to return to the previous mode");
  23.         getch();
  24.         textmode(oldmode);
  25.     }
  26.     if(oldmode == BW40 || oldmode == BW80)
  27.     {
  28.         cputs("Black and white  mode\n\r");
  29.         cputs("Press a key to switch mode\n\r");
  30.         getch();
  31.         if(oldmode == BW40)
  32.             textmode(BW80);
  33.         if(oldmode == BW80)
  34.             textmode(BW40);
  35.         cputs("Press any key to return to the previous mode");
  36.         getch();
  37.         textmode(oldmode);
  38.     }
  39. getch();
  40. }